<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        Ajax Framework - <span class="subitem">Counter</span>
    </ui:define>

    <ui:define name="description">
        An integer variable is incremented each time the button is clicked and current value is updated with ajax.
    </ui:define>

    <ui:param name="documentationLink" value="/ajax/rendering" />

    <ui:define name="implementation">
        
        <h:form>
            <h:panelGrid columns="2" cellpadding="5">
                <h:outputText value="Counter: " />
                <h:outputText id="output" value="#{counterView.number}" />
            </h:panelGrid>

            <p:commandButton value="Count" action="#{counterView.increment}" update="output" />
        </h:form>
        
    </ui:define>

</ui:composition>